Conversation
* feat: add image preview support on /files page When clicking an image file on the /files tab, show the image using a signed URL instead of "Preview not available for this file type". Co-Authored-By: Paperclip <noreply@paperclip.ing> * feat: add sandbox image preview on /files page Add image preview support for sandbox (GitHub repo) files on the /files page. The previous commit only handled Supabase-stored files via FileInfoDialog. This adds support for the SandboxFilePreview path by: - Adding getImageContent() to fetch base64 image data via API format=base64 - Extending useSandboxFileContent hook to detect images and return data URLs - Adding imageUrl prop to FilePreview as alternative to storageKey - Passing imageUrl through SandboxFilePreview and SandboxFileTree Depends on API PR #364 (base64 format support for sandbox file endpoint). Co-Authored-By: Paperclip <noreply@paperclip.ing> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: remove format=base64 query param, API auto-detects binary files The API now auto-detects binary files by extension and returns base64 encoding automatically — no need to pass format=base64 in the request. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: consolidate getImageContent into getFileContents, fix loading UX Address PR review feedback: - Eliminate getImageContent.ts — the API auto-detects binary files, so getFileContents now handles base64 responses and builds data URLs - Validate data.content before constructing data URLs - Fix loading state showing false "Preview not available" for images by moving loading/error checks before image/isTextFile checks - Add a spinner to the loading state Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: remove storageKey from FilePreview (YAGNI) storageKey/signed-URL image previews for Supabase-stored files are not part of this PR's scope. Remove the prop to keep the change focused on sandbox GitHub image previews only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * revert: drop formatting-only changes to FileInfoDialogContent Not part of this PR's scope — keeps the diff focused. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: extract getMimeType into existing getMimeFromPath utility (SRP) Add image MIME types to the existing getMimeFromPath utility and reuse it in getFileContents instead of an inline function. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: use Skeleton for loading state, move MIME util to lib/files - Replace loading spinner with shadcn Skeleton component in FilePreview - Create lib/files/getImageMimeType.ts instead of modifying utils/ (SRP) - Revert utils/getMimeFromPath.ts to base branch state Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: move getMimeFromPath from utils/ to lib/files/, add image MIME types Move getMimeFromPath to lib/files/ per project conventions (no utils/ path). Add image MIME types (png, jpg, jpeg, gif, webp, svg) to the existing map so it can be reused for both text and image MIME resolution (DRY). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: extract FilePreviewSkeleton into its own component (SRP) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: CTO Agent <cto@recoupable.com> Co-authored-by: Paperclip <noreply@paperclip.ing> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Sweets Sweetman <sweetmantech@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 21 minutes and 7 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Syncing test branch into main after merging PR #1604 (image preview on /files page).